package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * PlatFormAccount entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="platformaccount"

)

public class PlatFormAccount  implements java.io.Serializable {


    // Fields

     private String platformuuid;
     private String remark;
     private BigDecimal platformamount;
     private Date createtime;
     private Date lastmodifytime;
     private String status;
     private String platformname;
     private User userAccount;
     private Set<UpRechargeRecord> upRechargeRecords = new HashSet<UpRechargeRecord>(0);
     private Set<PlatFormAccountRecord> platFormAccountRecords = new HashSet<PlatFormAccountRecord>(0);
     private Set<DownShopRecharge> downShops = new HashSet<DownShopRecharge>(0);


    // Constructors

    /** default constructor */
    public PlatFormAccount() {
    }


    /** full constructor */
    public PlatFormAccount(String remark, BigDecimal platformamount, Date createtime, Date lastmodifytime, String status, String platformname, Set<UpRechargeRecord> upRechargeRecords, Set<PlatFormAccountRecord> platFormAccountRecords, Set<DownShopRecharge> downShops) {
        this.remark = remark;
        this.platformamount = platformamount;
        this.createtime = createtime;
        this.lastmodifytime = lastmodifytime;
        this.status = status;
        this.platformname = platformname;
        this.upRechargeRecords = upRechargeRecords;
        this.platFormAccountRecords = platFormAccountRecords;
        this.downShops = downShops;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="platformuuid", unique=true, nullable=false, length=40)

    public String getPlatformuuid() {
        return this.platformuuid;
    }

    public void setPlatformuuid(String platformuuid) {
        this.platformuuid = platformuuid;
    }

    @Column(name="remark", length=1000)

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name="platformamount", precision=28, scale=5)

    public BigDecimal getPlatformamount() {
        return this.platformamount;
    }

    public void setPlatformamount(BigDecimal platformamount) {
        this.platformamount = platformamount;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="useruuid")
    public User getUserAccount() {
		return userAccount;
	}


	public void setUserAccount(User userAccount) {
		this.userAccount = userAccount;
	}


	@Column(name="lastmodifytime", length=19)

    public Date getLastmodifytime() {
        return this.lastmodifytime;
    }

    public void setLastmodifytime(Date lastmodifytime) {
        this.lastmodifytime = lastmodifytime;
    }

    @Column(name="status", length=40)

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name="platformname", length=40)

    public String getPlatformname() {
        return this.platformname;
    }

    public void setPlatformname(String platformname) {
        this.platformname = platformname;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="platFormAccount")

    public Set<UpRechargeRecord> getUpRechargeRecords() {
        return this.upRechargeRecords;
    }

    public void setUpRechargeRecords(Set<UpRechargeRecord> upRechargeRecords) {
        this.upRechargeRecords = upRechargeRecords;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="platFormAccount")

    public Set<PlatFormAccountRecord> getPlatFormAccountRecords() {
        return this.platFormAccountRecords;
    }

    public void setPlatFormAccountRecords(Set<PlatFormAccountRecord> platFormAccountRecords) {
        this.platFormAccountRecords = platFormAccountRecords;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="platFormAccount")

    public Set<DownShopRecharge> getDownShops() {
        return this.downShops;
    }

    public void setDownShops(Set<DownShopRecharge> downShops) {
        this.downShops = downShops;
    }









}
